package com.hdlang.assists.ad.utils

import android.content.Context
import android.content.Intent
import android.provider.Settings
import com.ven.assists.AssistsCore
import android.graphics.Rect
import java.security.SecureRandom
import kotlin.math.abs

object AccessibilityServiceTool {

    fun enableAccessibilityService(context: Context) {
        try {
            goToAccessibilitySetting(context)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    fun goToAccessibilitySetting(context: Context) {
        context.startActivity(Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
    }

    fun isAccessibilityServiceEnabled(context: Context): Boolean {
        return AssistsCore.isAccessibilityServiceEnabled()
    }

}